package com.rephilo.code.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * email service client
 *
 * @author rephilo
 */
@FeignClient(name = "lagou-service-email")
@RequestMapping("/api/email")
public interface EmailRemoteService {
    /**
     * 发送邮件
     *
     * @param email
     * @param subject
     * @param code
     * @return
     */
    @PostMapping("/{email}/{code}")
    Boolean sendEmail(@PathVariable String email, @RequestParam String subject, @PathVariable String code);
}
